﻿
// svn:keywords
// $URL: http://plazes-aspi.googlecode.com/svn/trunk/src/as2/PlazesServiceTest.as $
// $Id: PlazesServiceTest.as 2 2006-07-28 22:56:36Z florian.mlodzik $

/**
   ActionScript Class File 
   
   @class  
   @package
   @author florian.mlodzik@gmail.com
   @codehint 
   @example 
   @tooltip 
*/
import com.orthogeneric.net.xmlrpc.XmlRpc;
import com.orthogeneric.net.xmlrpc.events.XmlRpcError;
import com.orthogeneric.net.xmlrpc.events.XmlRpcResult;
import com.orthogeneric.webapis.plazes.PlazesService;
import com.orthogeneric.webapis.plazes.events.PlazesResult;
import com.orthogeneric.webapis.plazes.events.PlazesFault;
import com.orthogeneric.webapis.plazes.events.PlazesError;
import com.orthogeneric.webapis.plazes.methods.UserMethods;

class PlazesServiceTest 
{
  public var ps:PlazesService;
  public var results:Array;
  public var errors:Array;
  public var faults:Array;
  public function PlazesServiceTest()
  {
    results = new Array();
    errors = new Array();
    faults = new Array();
    
    var me = this;
    ps = new PlazesService("39807efb8a70ec96ba4c740950691910", "florian", "", true);
    ps.onPlazesResult = function (evt:PlazesResult)
    {
      trace("PlazesResult: "+evt.remoteMethod);
      me.results.push(evt); 
    }
    ps.onPlazesFault = function (evt)
    {
      trace("PlazesFault");
      me.faults.push(evt);  
    }
    ps.onPlazesError = function (evt:PlazesError)
    {
      trace("PlazesError: "+evt.remoteMethod)
      me.errors.push(evt);    
    }    
    
    ps.api.getVersion();
    ps.plaze.getInfo("cd21e1717f61ba9cf9df9006038da172");
    ps.plaze.getComments("cd21e1717f61ba9cf9df9006038da172")
    ps.plaze.getPhotos("cd21e1717f61ba9cf9df9006038da172")
    ps.plaze.getDistance("cd21e1717f61ba9cf9df9006038da172", "ef33172eb0ec54d4067104e8be7c819b")
    ps.plaze.getPeople("cd21e1717f61ba9cf9df9006038da172")
    ps.user.getFriends(false);
    ps.user.getTrazes(366);
  }
}
